package com.cssw.fyzb.core.mao.video;

import com.cssw.fyzb.core.model.mos.UserVideoMo;

/**
 * @author YangYiQun
 */
public interface UserVideoMao {

    /**
     * 查询视频点赞信息
     *
     * @param videoId
     * @return
     */
    UserVideoMo findByVideoId(Long videoId);


    /**
     * 是否点赞
     *
     * @param videoId
     * @param userId
     * @return
     */
    boolean existsLike(Long videoId, Long userId);

    void createIfNull(Long videoId);

    /**
     * 点赞
     * @param videoId
     * @param userId
     */
    void like(Long videoId, Long userId);
    

    /**
     * 取消点赞
     *
     * @param videoId
     * @param userId
     */
    void cancelLike(Long videoId, Long userId);
    
}
